<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><s:property value="#session.access"/></title>
<meta name="viewport" content="width=device-width,inital-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/css/bootstrap.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/css/bootstrap-responsive.css" type="text/css" rel="stylesheet"/>
<link href="<%=request.getContextPath() %>/js/date/skin/WdatePicker.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/bootstrap.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/date/WdatePicker.js"></script>
<script type="text/javascript">

function logic(event,txnNo){
	if(event.keyCode==13 || event.keyCode==42)
	{
		var path="<%=request.getContextPath()%>/logic_save.html";
		var data="txnNo="+txnNo+"&logName="+$("#logName_"+txnNo).val()+"&logOrder="+$("#logOrder_"+txnNo).val();
		
		$.ajax
		({
		  url:path,
		  cache: false,
		  async: true,
		  type: "POST",
		  data:data,
		  success: function(html){
			  if($.parseJSON(html).code=="0000"){
				  location.reload();
			  }else{
				  $.MsgBox.Alert("提示 : ","["+$.parseJSON(html).code+"]"+$.parseJSON(html).message);
			  }
		  }
		}); 
	}
}

</script>
</head>
<body>
	<div class="container">
		
		<s:action name="global_menu"  executeResult="true"></s:action>
		
		<div class="row">
			<div class="span12">
					
					<h5>
						物流信息上传
					</h5>
					
					<form id="sform" action="transaction_listlogic.html" method="get" enctype="multipart/form-data">
						<table>
							<tr>
								<td height="40">
									<s:textfield  id="txnNo" name="txnNo" placeholder="交易流水号"></s:textfield>
								</td>
							</tr>
							<tr>
								<td height="40">
									<s:textfield  id="txnOrder" name="txnOrder" placeholder="订单号"></s:textfield>
								</td>
							</tr>
							<tr>
								<td height="40">
									<s:textfield  id="txnSite" name="txnSite" placeholder="来源网站"></s:textfield>
								</td>
							</tr>
							<tr>
								<td height="40">
									<s:textfield  id="txnDateTop"  name="txnDateTop" placeholder="发生日期起"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="txnDateTop" format="yyyy-MM-dd"/></s:param></s:textfield>
									 - 
									<s:textfield  id="txnDateEnd"  name="txnDateEnd" placeholder="发生日期止"  onclick="WdatePicker();"  cssStyle="width:100px;" ><s:param name="value"><s:date name="txnDateEnd" format="yyyy-MM-dd"/></s:param></s:textfield>
								</td>
							</tr>
							<tr>
								<td height="40">
									<input type="button"    class="btn btn-primary"  value="查询" onclick="sform.submit();"/>
									<input type="button" class="btn btn-primary"    value="批量上传"  onclick="location.href='<%=request.getContextPath() %>/logic_editbatch.html'" />
								</td>
							</tr>
						</table>
					</form>
					
					<ul class="tasks zebra-list">
						<s:iterator value="transactionList" id="show" status="seq">
						<li>
							<span class="title">
								<s:property value="#show.txnOrder"/> | <s:property value="#show.txnSite"/>
							</span>
							<span class="meta">
							<s:property value="#show.txnNo"/> | 
							<s:text name="global.format.datetime"><s:param value="#show.txnDate"/></s:text>
							</span>
							<span class="meta">
								<select id="logName_<s:property value="#show.txnNo" />" style="width:120px;" >
									<s:iterator value="@dicts.LogicDict@LOGIC_MAP" id="flag" >
										<option value="<s:property value="#flag.key" />"><s:property value="#flag.value" /></option>
									</s:iterator>
								</select>
								<input id="logOrder_<s:property value="#show.txnNo" />"  type="text" style="width: 120px;" placeholder="运单号" onkeyup="logic(event,'<s:property value="#show.txnNo"/>') ;"/>
							</span>
						</li>
						</s:iterator>
					</ul>
					
					<%String paga="/"+session.getAttribute("access")+"/page.jsp"; %>
					<s:set name="pageInfo" value="pageInfo"></s:set> <jsp:include flush="true" page="<%=paga %>"></jsp:include>
					
					<div class="hero-unit" style="padding: 15px;font-size: 12px;line-height: 20px;">
						<p>
							1 . 物流信息上传功能默认查询出的结果都是支付成功且未发货状态的的交易
						</p>
						<p>
							2 . 只有上传了物流信息的交易,才会按照最低结算周期进行该交易的清结算,否则该交易只能按照最高结算周期才能结算相关款项至商户账户中
						</p>
					</div>
					
				</div>
		</div>
		
		
		<s:action name="global_foot"  executeResult="true"></s:action>
	</div>
</body>
</html>

